import random
import string

def generate_data():
    # 随机生成字符串s
    n = random.randint(10, 30)
    s = ''.join(random.choices(string.ascii_lowercase, k=n))
    # 随机生成chars
    chars_len = random.randint(3, 10)
    chars = ''.join(random.sample(string.ascii_lowercase, chars_len))
    # 随机生成vals
    vals = [random.randint(-20, 20) for _ in range(chars_len)]
    return s, chars, vals

if __name__ == "__main__":
    s, chars, vals = generate_data()
    print("s =", s)
    print("chars =", chars)
    print("vals =", vals)
